package Entity;

import java.io.Serializable;

/** this class Create new Instance of customer report*/
public class CustomerReport implements Serializable {
	private static final long serialVersionUID = 42L;
	
	/**attributes for customer report*/
	int TotalCustomers;
	int TotalBought;
	float TotalPercent;
	static String[] Totalcustomers =new String[256];
	static int[] Totalbought =new int[256];
	static float[] Totalpercent =new float[256];
	static int i=0;

	/**default constructor*/
	public CustomerReport()
	{
			
	}
	
	/**get functions*/
	public String [] getTotalCustomers()
	{
		return CustomerReport.Totalcustomers;
	}
	
	public int [] getTotalBought()
	{
		return CustomerReport.Totalbought;
	}
	
	public float[] getTotalPercent()
	{
		return CustomerReport.Totalpercent;
	}
	
	public int getCustomersArraySize()
	{  int count=0;
		for(int i=0;i<256;i++)
		{
			if(Totalcustomers[i]!=null)
				count++;
		}
		return count;
	}
	
	/** set functions */
	public  void setTotalCustomers(int TotalCustomers)
	{
		this.TotalCustomers=TotalCustomers;
	}
	
	public  void setTotalBought(int TotalBought)
	{
		this.TotalBought=TotalBought;
	}
	
	public  void setTotalPercent(float TotalPercent)
	{
		this.TotalPercent=TotalPercent;
	}

	/**function which add customer's details into list*/
	public  void AddCustomerstToList(String cusromerid,int  bought, float percent  )
	{
		Totalcustomers[i]=cusromerid;
		Totalbought[i]=bought;
		Totalpercent[i]=percent;
		i++;	
	}	
}
